<extend name="desktop_default/template/base_index2" />

<block name="area_header">

    <style type="text/css">
        body{
            background: #f5f5f5;
        }
        .order-detail{
            margin: 0 20px;
        }
        .order-detail .more{
            border-bottom: 1px solid #e0e0e0;
            padding: 10px 0px;
            line-height: 47px;
        }
        .order-detail .more .actions{

            float: right;
            padding-top: 5px;
        }
        .order-detail .order-summary{
            padding: 25px 0;
            color: #b0b0b0;
            margin-bottom: 25px;
        }
        .order-detail .order-items-table .col {
            height: 90px;
            border-bottom: 1px solid #e0e0e0;
            text-align: left;
            color: #333;
        }
        .order-detail .order-items-table{
            width:100%;
        }
        .order-detail .order-items-table .col-thumb {
             width: 100px;
         }
        .order-detail .order-items-table .col-name {
            width: 290px;
        }
        .order-detail .order-items-table .name a{
            color: #333;
            font-size: 14px;
        }
        .order-detail .order-items-table .col-actions {
            width: 120px;
            padding: 0;
            text-align: right;
        }
        .order-detail-info{
            position: relative;
            _height: 120px;
            height: auto;
            min-height: 120px;
            padding: 6px 0 12px;
            margin: 30px 0px;
            border-bottom: 1px solid #e0e0e0;
        }
        .order-detail-info .info-table{
            color: #757575;

            font-size: 14px;
        }
        .order-detail-info h3 {
            margin: 0 0 15px;
            font-size: 18px;
            font-weight: 400;
            color: #333;
        }
        .order-detail .order-detail-total .total-table {
            width: 235px;
            margin: 0 0 0 auto;
            color: #757575;
        }
        .order-detail .order-detail-total .total-table td{

            text-align: right;
            color: #ff6700;
            padding: 5px 0;
        }
        .order-detail .am-progress-bar.first{
            border-bottom-left-radius: 15px;
            border-top-left-radius: 15px;
        }
        .order-detail .am-progress-bar.last{
            border-bottom-right-radius: 15px;
            border-top-right-radius: 15px;
        }
        .order-detail .am-progress-bar.disabled{
            color: #FFFFFF;
            background-color: #CACACA;
        }
        .order-detail .am-progress,
        .order-detail .am-progress-bar
        {
            -webkit-box-shadow:none;
             box-shadow: none;
        }
        .order-detail .am-progress{

            background: #ffffff;
        }
        .order-detail .orderstatus-timeline{
            font-size: 12px;
            color:#757575;
        }
        .btn-line-gray {
            border-color: #b0b0b0;
            background: #fff;
            color: #757575;
        }
        .am-storage-his{
            font-size: 12px;
        }
    </style>

</block>

<block name="area_body">
    <include file="desktop_default/width/right" />

    <header class="header">
        <include file="desktop_default/width/top" />
        {:W('Partials/nav_group')}
    </header>
    <div class="div_main shop-container am-cf">
        <div class="div_left" >
            <include file="desktop_default/width/list"/>
        </div>
        <div class="div_right" >
            <div class="order-detail">
                <h5 class="title">订单详情</h5>
                <div class="more  am-cf">
                    <div class="subtitle am-fl am-text-lg">订单号：{$order_info.order_code}</div>
                    <div class="actions am-fr">
                        <eq name="order_info['pay_status']" value="1">
                            <else/>
                        <a href="{:U('Shop/Orders/repay',array('id'=>$order_info['id']))}" class="ajax-get am-btn am-btn-danger btn-line-gray">重新支付</a>
                        </eq>
                        <eq name="order_info['order_status']" value="4">
                            <eq name="order_info['wms_status']" value="WMS_SHIPED">
                            <a data-confirm-text="确认收到货了?" href="{:U('Shop/Orders/receive',array('order_code'=>$order_info['order_code']))}" class="ajax-get confirm am-btn am-btn-danger btn-line-gray">我已收到货</a>
                            <a target="_blank" href="{:U('Home/Express/index',array('pc'=>1,'company_code'=>$express['expresscode'],'express_code'=>$express['expressno']))}" class="am-btn am-btn-danger btn-line-gray"><i class="am-icon-"></i>查看物流</a>
                            </eq>
                        </eq>
                    </div>
                </div>
                <div class="order-summary">
                    <div class="order-status">

                        <eq name="order_info['pay_status']" value="1">
                        {:getTaobaoOrderStatus($order_info['order_status'],$order_info['wms_status'])}
                            <else/>
                            未付款
                        </eq>
                    </div>
                    <div class="am-progress am-margin-top-sm">
                        <div class="first am-progress-bar am-progress-bar-success"  style="width: 20%">下单</div>
                        <div class="am-progress-bar am-progress-bar-success <empty name="timeline['pay_time']">disabled</empty> "  style="width: 20%">付款</div>
                        <div class="am-progress-bar am-progress-bar-success <empty name="timeline['shipped_time']">disabled</empty> "  style="width: 20%">出库</div>
                        <div class="am-progress-bar am-progress-bar-success <empty name="timeline['received_time']">disabled</empty> "  style="width: 20%">收货</div>
                        <div class="last am-progress-bar am-progress-bar-success <empty name="timeline['completed_time']">disabled</empty> "  style="width: 20%">交易成功</div>
                    </div>
                    <div class="orderstatus-timeline am-margin-top-sm">
                        <div  class="am-fl am-text-center" style="width: 20%">{:date("Y年m月d日 H:i:s",$order_info['createtime'])}</div>
                        <div  class="am-fl am-text-center  <empty name="timeline['pay_time']">am-hide</empty>" style="width: 20%">{:date("Y年m月d日 H:i:s",$timeline['pay_time'])}</div>
                        <div  class="am-fl am-text-center  <empty name="timeline['shipped_time']">am-hide</empty>" style="width: 20%">{:date("Y年m月d日 H:i:s",$timeline['shipped_time'])}</div>
                        <div  class="am-fl am-text-center  <empty name="timeline['received_time']">am-hide</empty>" style="width: 20%">{:date("Y年m月d日 H:i:s",$timeline['received_time'])}</div>
                        <div class="am-fl am-text-center  <empty name="timeline['completed_time']">am-hide</empty>"  style="width: 20%">{:date("Y年m月d日 H:i:s",$timeline['completed_time'])}</div>
                    </div>

                </div>
    <!-- 仓库历史 -->
            <div class="am-storage-his">
                <empty name="timeline['wms_his']">
                    <else/>
                        <table class="am-table am-table-bordered am-table-radius am-table-striped">
                                <thead>
                                    <tr>
                                        <th class="am-text-center">时间</th>
                                        <th>仓库状态</th>
                                    </tr>
                                </thead>
                            <tbody>
                                <volist name="timeline['wms_his']" id="vo">
                                        <tr>
                                            <td class="am-text-center">{:date("Y年m月d日 H:i:s",$vo['create_time'])}</td>
                                            <td>{:getWMSDescription($vo['next_status'])}</td>
                                        </tr>


                                </volist>
                            </tbody>

                        </table>

                </empty>
            </div>

                <div class="order-item-list">
                    <volist name="item_list" id="vo">
                        <table class="order-items-table">
                        <tbody>
                        <tr>
                            <td class="col col-thumb">
                                <div class="figure figure-thumb">
                                    <a target="_blank" href="{:U('Shop/Product/detail',array('id'=>$vo['p_id']))}" >
                                        <img src="{:getImageUrl($vo['img'],120)}" width="80" height="80" alt="">
                                    </a>
                                </div>
                            </td>
                            <td class="col col-name">
                                <p class="name">
                                    <a target="_blank" href="{:U('Shop/Product/detail',array('id'=>$vo['p_id']))}">{$vo.name}</a>
                                </p>
                            </td>
                            <td class="col col-price">
                                <p class="price">{$vo.price}元 × {$vo.count}</p>
                            </td>
                            <td class="col col-actions">
                            </td>
                        </tr>
                        </tbody></table>
                    </volist>
                </div>

            <!-- 收货信息 -->
            <div class="order-detail-info">
                <h3>收货信息</h3>
                <table class="info-table">
                    <tbody><tr>
                        <th>姓&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;名：</th>
                        <td>{$contact_info.contactname}</td>
                    </tr>
                    <tr>
                        <th>联系电话：</th>
                        <td>{$contact_info.mobile}</td>
                    </tr>
                    <tr>
                        <th>收货地址：</th>
                        <td>{$contact_info.province} {$contact_info.city} {$contact_info.area} {$contact_info.detailinfo}</td>
                    </tr>
                    </tbody></table>
                <div class="actions">
                </div>

            </div>

            <!-- 物流信息 -->
            <notempty name="express">
            <div class="order-detail-info">
                <h3>物流信息</h3>
                <table class="info-table">
                    <tbody><tr>
                        <th>物流公司：</th>
                        <td>{$express.expressname}</td>
                    </tr>
                    <tr>
                        <th>运单号：</th>
                        <td>{$express.expressno}</td>
                    </tr>
                    <tr>
                        <th>发货时间：</th>
                        <td>{:date("Y年m月d日 H:i:s",$express['createtime'])}</td>
                    </tr>
                    </tbody>
                </table>
            </div>
            </notempty>

                <!-- 支付方式 -->
            <div class="order-detail-info">
                <h3>支付方式及送货时间</h3>

                <table class="info-table">
                    <tbody><tr>
                        <th>支付方式：</th>
                        <td>{:getPayType($order_info['pay_type'])}</td>
                    </tr>
                    <tr>
                        <th>送货时间：</th>
                        <td>不限送货时间</td>
                    </tr>
                    </tbody>
                </table>

            </div>

            <div class="order-detail-total">
                <table class="total-table">
                    <tbody><tr>
                        <th>商品总价：</th>
                        <td><span class="num">{$order_info.goods_amount}</span>元</td>
                    </tr>
                    <tr>
                        <th>优惠金额：</th>
                        <td><span class="num">-{$order_info['discount_money']}</span>元</td>
                    </tr>
                    <tr>
                        <th>税&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;款：</th>
                        <td><span class="num">+{$order_info['tax_amount']}</span>元</td>
                    </tr>
                    <tr>
                        <th>运&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;费：</th>
                        <td><span class="num">+{$order_info['post_price']}</span>元</td>
                    </tr>
                    <tr>
                        <th class="total">实付金额：</th>
                        <td class="total"><span class="num">{$order_info['price']}</span>元</td>
                    </tr>
                    </tbody></table>
            </div>

        </div>
    </div>

    <include file="desktop_default/width/floor" />
</block>

<block name="area_footer">


</block>
